﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty
{
    /// <summary>
    /// 生命附加福安重大疾病保险
    /// </summary>
    class Class2
    {
        /// <summary>
        /// 重大疾病保险金给付
        /// </summary>
        /// <param name="ppa"></param>
        /// <param name="da"></param>
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("重疾"))
            {
                da.Value = ppa.Amount * 3;
                ppa.IsCurrentFinish = true;
            }
        }

        /// <summary>
        /// 特种重大疾病额外保险金给付
        /// 优先级高
        /// </summary>
        /// <param name="ppa"></param>
        /// <param name="da"></param>
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("特种重疾"))
            {
                ppa.SchemePeriodActing.InsurantStates.Add("重疾");

                da.Value = ppa.Amount * 2;
                ppa.IsCurrentFinish = true;
            }
        }

    }
}
